/**
 * @author Eric Wu
 * @since 1.8
 * create on 2018.09.29
 */
public class Node<T> {

    private T data;
    private Node<T> left;
    private Node<T> right;

    public Node(T data){
        this.data = data;
        left = null;
        right = null;
    }

    public Node(){

    }

    /**
     * Gets the value of data.
     *
     * @return the value of data
     */
    public T getData() {
        return data;
    }

    /**
     * Sets the data.
     *
     * <p>You can use getData() to get the value of data</p>
     *
     * @param data data
     */
    public void setData(T data) {
        this.data = data;
    }

    /**
     * Gets the value of left.
     *
     * @return the value of left
     */
    public Node<T> getLeft() {
        return left;
    }

    /**
     * Sets the left.
     *
     * <p>You can use getLeft() to get the value of left</p>
     *
     * @param left left
     */
    public void setLeft(Node<T> left) {
        this.left = left;
    }

    /**
     * Gets the value of right.
     *
     * @return the value of right
     */
    public Node<T> getRight() {
        return right;
    }

    /**
     * Sets the right.
     *
     * <p>You can use getRight() to get the value of right</p>
     *
     * @param right right
     */
    public void setRight(Node<T> right) {
        this.right = right;
    }
}
